//
//  CustomNavViewController.m
//  PPStream
//
//  Created by Niulinyu on 12-11-12.
//
//

#import "CustomNavViewController.h"


@interface CustomNavViewController ()<UIGestureRecognizerDelegate,UINavigationControllerDelegate>

@end

@implementation CustomNavViewController

-(UIStatusBarStyle)preferredStatusBarStyle
{
    return UIStatusBarStyleLightContent;
}
- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil
{
    self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
    if (self) {
        // Custom initialization
    }
    return self;
}

-(instancetype)initWithRootViewController:(UIViewController *)rootViewController
{
    self = [super initWithRootViewController:rootViewController];
    self.navigationBarHidden = YES;
    
    
    return self;
}
- (void)viewDidLoad
{
    [super viewDidLoad];
}



- (UIInterfaceOrientationMask)supportedInterfaceOrientations
{
//    return UIInterfaceOrientationMaskPortrait | UIInterfaceOrientationMaskPortraitUpsideDown;
    return self.topViewController.supportedInterfaceOrientations;
}

-(BOOL)shouldAutorotate
{
//    NSLog(@"self.topViewController------>%@------->%d",self.topViewController,self.topViewController.shouldAutorotate);
    return self.topViewController.shouldAutorotate;
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
{
    return interfaceOrientation == UIInterfaceOrientationPortrait || interfaceOrientation == UIInterfaceOrientationPortraitUpsideDown;
}
- (void)didReceiveMemoryWarning
{
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}


@end
